package com.matrix.java.chap_03;

import java.util.Scanner;

/*
    加法测验
 */
public class Ex3_10 {
    public static void main(String[] args) {
        int num1 = (int) (Math.random() * 100);
        int num2 = (int) (Math.random() * 100);
        int sum = num1 + num2;
        Scanner input = new Scanner(System.in);
        System.out.print(num1 + " " + num2 + "和为: ");
        int num3 = input.nextInt();
        if (sum == num3) {
            System.out.println("正确");
        } else {
            System.out.println("错误");
        }
    }
}
